home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
pxewin.zip
/
PXLISTBX.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-27
|
3KB
|
102 lines
// PXEWIN - (C) Copyright 1992 by Beam Engineering, INC.
// PXLISTBX.HPP //
// Contents ----------------------------------------------------------------
//
// This module contains the PXListBox class.
//
// End ---------------------------------------------------------------------
// External Reference Name for this Header ---------------------------------
#ifndef PXLISTBX_HPP
#define PXLISTBX_HPP
// End ---------------------------------------------------------------------
// Interface Dependencies --------------------------------------------------
#ifndef BROWSE_HPP
#include "browse.hpp"
#endif // BROWSE_HPP //
// End ---------------------------------------------------------------------
// class PXListBox //
class PXListBox:public TListBox
{
private:
PDBDISPLAY my_display; /* Display object pointer */
PBrowser my_parent; /* Pointer to parent window
*/
virtual const Pchar streamableName()
const /* Defines the streamable
name for this class. */
{
return "PXListBox";
}
protected:
virtual Pvoid read(Ripstream); /* Read persistant object */
virtual void write(Ropstream); /* Write persistant object */
PXListBox(StreamableInit): /* Persistant object
constructor */
TListBox(streamableInit)
{
}
/* Redefine this procedure
to include additional
keystrokes not handled */
virtual void DefWndProc(RTMessage Msg);
public:
PXListBox(PBrowser AParent,
int AnId,int X,int Y,int W,int H,
PTModule AModule = NULL);
static PTStreamable build(); /* Build persistant object */
/* Responds to a selection
change by selecting all
fields of a given record
*/
virtual void LBNSelChange(RTMessage Msg) =
[NF_FIRST + LBN_SELCHANGE];
// Redefine WMPaint so that list boxes are not drawn when the
// the Update flag is reset. Since the OWL will do screen refresh
// on the list boxes for each new entrie in the box, it is better
// to do a paint after the list has completely been updated.
virtual void WMPaint(RTMessage Msg) = [WM_FIRST + WM_PAINT];
};
// Description -------------------------------------------------------------
//
// The PXListBox class is a modification of the TListBox class. A
// pointer to the DBDISPLAY object is passed. This object is used
// to call the SelRecord function. If a selection event occurs in
// any of the list boxes, the list box calls the SelRecord function
// that selects all the other fields so that the record bar changes
// to coorespond to that item. The focus remains set at the item
// you have selected.
//
// End ---------------------------------------------------------------------
// Define inserters and extractors for persistant objects:
inline Ripstream operator >> (Ripstream is,RPXListBox cl)
{return is >> (RTStreamable)cl;}
inline Ripstream operator >> (Ripstream is,RPPXListBox cl)
{return is >> (RPvoid)cl;}
inline Ropstream operator << (Ropstream os,RPXListBox cl)
{return os << (RTStreamable)cl;}
inline Ropstream operator << (Ropstream os,PPXListBox cl)
{return os << (PTStreamable)cl;}
#endif // PXLISTBX_HPP //